package net.sunbeta.test.helloworld;

import com.google.inject.Guice;
import com.google.inject.Injector;

public class FooDispatcher {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		FooController controller = new FooController();
		Injector injector = Guice.createInjector(new FooModule());
		injector.injectMembers(controller);

		// Our action is now injected with a FooManager, so let's use it
		Foo foo = controller.create("Bar");
		Foo bar = controller.retrieve(foo.getId());
		System.out.println("bar.name => " + bar.getName());
	}

}
